﻿using System;
using UnityEngine;
using UFrameWork;
using System.Collections;

/// <summary>
/// 程序初始化类
/// </summary>
class Init : UView
{
    //全局只有一个实例
    private static Init Instance;

    void Awake()
    {
        if (Instance != null)
        {
            Destroy(gameObject);
            return;
        }

        Instance = this;
        DontDestroyOnLoad(gameObject);
        UWork.Init();
        UWork.RegAssembly(GetType().Assembly);

        Action(UEvent.INIT_FINISH);
    }
}